<!DOCTYPE html>
<html
  layout:decorator="components/layout"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  xmlns:th="http://www.thymeleaf.org"
>
<head>
  <title>特征库</title>
</head>
<body>
<div
  layout:fragment="content"
  class="container"
  id="app" v-cloak
>
  <!--引入边框角-->
  <div th:replace="components/common-border-bg::common-border-bg"></div>

  <div class="con_mid">
    <div class="section-title"><i class="tit_ico1"></i>特征库信息
      <a
        href="javascript:void(0);"
        @click="toggle"
        class="search"
      ><i class="search_ico"></i>高级搜索</a>
    </div>

    <!--搜索框-->
    <div
      class="search_con"
      v-show="formShow"
    >
      <table
        width="100%"
        align="center"
        cellpadding="0"
        cellspacing="0"
        class="digest-table"
        border="1"
      >
        <tbody>
        <tr>
          <td
            width="150"
            class="TitleTD"
          >编号：
          </td>
          <td
            class="ContentTD"
            align="left"
            style="padding-left: 5px;"
          >
            <input
              v-model="form.id"
              type="text"
              class="input_text"
              size="30"
              value=""
            >
          </td>
        </tr>
        <tr>
          <td
            width="150"
            class="TitleTD"
          >特征信息：
          </td>
          <td
            class="ContentTD"
            align="left"
            style="padding-left: 5px;"
          >
            <input
              v-model="form.featureInfo"
              type="text"
              class="input_text"
              size="30"
              value=""
            >
            <input
              v-model="form.featureInfoAction"
              type="radio"
              value="1"
              checked
            >精确查找
            <input
              v-model="form.featureInfoAction"
              type="radio"
              value="2"
            >模糊查找
          </td>
        </tr>
        <tr>
          <td
            width="150"
            class="TitleTD"
          >详细说明：
          </td>
          <td
            class="ContentTD"
            align="left"
            style="padding-left: 5px;"
          >
            <input
              v-model="form.description"
              type="text"
              class="input_text"
              size="30"
              value=""
            >
            <input
              v-model="form.descriptionAction"
              type="radio"
              value="1"
              checked
            >精确查找
            <input
              v-model="form.descriptionAction"
              type="radio"
              value="2"
            >模糊查找
          </td>
        </tr>
        <tr>
          <td
            colspan="4"
            align="center"
            class="ContentTD"
          >
            <input
              type="button"
              class="btn_submit"
              @click="searchPage"
              value="查找"
            >
            <input
              type="button"
              class="btn_submit"
              @click="resetPage"
              value="重置"
            >
          </td>
        </tr>
        </tbody>
      </table>
    </div>
    <!--内容-->
    <my-table
      :data="page.records"
      :columns="columns"
      @handle-selection-change="selection"
      @handle-sort-change="sortChange"
    >
      <template #operating="scope">
          <span>
              <button
                class="btn_common"
                @click.stop.prevent="() => updateInfo(scope.row)"
                v-realm="'system-configuration:feature-library:edit'"
              >修改</button>
          </span>
      </template>
      <template #del="scope">
          <span>
              <a
                href=""
                style="margin-left: 10px"
              ><img
                border="0"
                src="/static/img/icon_delete.gif"
                alt="删除"
                @click.stop.prevent="del(scope.row)"
                v-realm="'system-configuration:feature-library:edit'"
              ></a>
          </span>
      </template>
    </my-table>
    <div class="pagination">
      <el-pagination
        background
        @size-change="changeSize"
        @current-change="goto"
        :current-page="page.current"
        :page-sizes="[10, 20, 30]"
        :page-size="page.size"
        layout="total, sizes, prev, pager, next, jumper"
        :total="page.total"
      >
      </el-pagination>
    </div>
    <div class="pagination-tool">
      <input
        type="button"
        value="导入所有"
        class="btn_common2"
        @click="showFileSelector"
        v-realm="'system-configuration:feature-library:edit'"
      />
      <input
        type="button"
        value="导出所有"
        class="btn_common2"
        @click="exportFile"
        v-realm="'system-configuration:feature-library'"
      />
      <input
        type="button"
        value="删除"
        class="btn_common2"
        @click="deleteSelected"
        v-realm="'system-configuration:feature-library:edit'"
      />
    </div>
    <import-excel
      :file-selector-show="fileSelectorShow"
      template-url=""

      v-on:import-file="importFile"
      v-on:reset-file="resetFile"
    />
  </div>

  <el-dialog
    :title="dtitle"
    width="30%"
    :visible.sync="updateVisible"
  >
    <el-form
      :model="sysFeature"
      style="margin-left: 5px"
    >
      <el-form-item
        label="编号"
        :label-width="formLabelWidth"
      >
        <el-input v-model="sysFeature.id"></el-input>
      </el-form-item>
      <el-form-item
        label="优先级"
        :label-width="formLabelWidth"
      >
        <el-input v-model="sysFeature.featureInfo"></el-input>
      </el-form-item>
      <el-form-item
        label="详细说明"
        :label-width="formLabelWidth"
      >
        <el-input v-model="sysFeature.description"></el-input>
      </el-form-item>
    </el-form>
    <div
      slot="footer"
      class="dialog-footer"
    >
      <el-button @click="updateVisible = false">取 消</el-button>
      <el-button
        type="primary"
        @click="updateSysFeature"
        v-realm="'system-configuration:feature-library:edit'"
      >确 定
      </el-button>
    </div>
  </el-dialog>


</div>
</div>
<div layout:fragment="js">
  <script src="/static/js/module/system-config/model/SysFeature.js"></script>
  <script src="/static/js/module/system-config/api/sysFeatureApi.js"></script>
  <script src="/static/js/module/system-config/admin_invadefend.js"></script>
</div>
</body>
</html>
